#指定版本
cmake_minimum_required(VERSION 3.16)
 
#指定工程名称
project(expat_used)
 
#设置变量的值
set(SRC_LIST ${PROJECT_SOURCE_DIR}/src/main.cpp)


#指定头文件位置
include_directories(${PROJECT_SOURCE_DIR}/expat/include)
 
 
IF(WIN32)
	set(EXPAT_LIB ${PROJECT_SOURCE_DIR}/expat/lib/vc_x86/libexpat.lib)
ELSEIF(UNIX)
	set(EXPAT_LIB ${PROJECT_SOURCE_DIR}/expat/lib/gcc_x64/libexpat.so.1.9.2)
ENDIF()

#生成可执行文件
add_executable(expat_used ${SRC_LIST})
 
#添加链接库
target_link_libraries(expat_used ${EXPAT_LIB})
